<template>
  <div m-role="UINavigationBar">
    <div class="UINavigationBarRoom">
      <div m-role="left">
        <div m-role="UIButton" @click='back' v-if="status">
          <i class="navicon"></i>
        </div>
      </div>
      <div m-role="title" id="titleCenter">{{ text }}</div>
      <div m-role="right">
        <!--<div m-role="UIButton" m-href="" id="moreBtn">
        </div>-->
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'header',
    data () {
      return {
        msg: '公共头部',
      }
    },
    props:['text','status'],
    methods:{//方法
      back(){
        this.$router.go(-1)
      }
    },
    computed:{//计算  引入vuex里的state数据

    },
    mounted(){//组件加载完执行
      
    },
    watch:{//监听数据，某数据改变时触发事件

    },
    components:{//引入组件

    },
    destroyed(){//离开组件

    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
